package LanQiao.jichu;

import java.math.BigInteger;
import java.util.Scanner;

//十六进制转换为十进制
public class BASIC_11 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.next();
        BigInteger a = new BigInteger(s,16);
        System.out.println(a);
    }
}
